package it.unicam;

public class CommentProperties {
	
	public String getCommentProperty(String nameFile,String property){
		
		String feedback = "property does not exist";
		
		if(nameFile.equals("hermes.properties")){
			
			if(property.equals("HERMES.STORE_DIRECTORY")){
				feedback="Where the database of all the platform agents is stored";
			}
			else if(property.equals("HERMES.SERVICES_NAMES")){
				feedback="Names of the Service Agents to load";
			}
			else if(property.equals("HERMES.LOGS")){
				feedback="If you want or not log the activity of the current place";
			}
			else if(property.equals("HERMES.LOGS_LEVEL")){
				feedback="The level of the logger (FATAL,ERROR,WARNING,INFO,DEBUG)";
			}
			else if(property.equals("HERMES.LOGS_CLASS")){
				feedback="Class of logs (the class file of the Logger to use)";
			}
			else if(property.equals("HERMES.LOGS_PROPERTYFILE")){
				feedback="Property file of the logger";
			}
			else if(property.equals("HERMES.NET_CLASS")){
				feedback="Class of net component (Open, SSL, ...)";
			}
			else if(property.equals("HERMES.NET_PROPERTYFILE")){
				feedback="Property file of the Net component used";
			}
			else if(property.equals("HERMES.LOAD_SERVICEAGENTS")){
				feedback="If you want or not load service agents stored into HERMES.SERVICES_DIRECTORY directory";
			}
			else if(property.equals("HERMES.SAVE_AGENTS")){
				feedback="If you want or not save in HERMES.STORE directory the agent arriving on your platform";
			}
			else if(property.equals("HERMES.LOAD_AGENTS")){
				feedback="If you want or not load at platform startup agents saved in HERMES.STORE directory";
			}
			else if(property.equals("HERMES.GUI")){
				feedback="If you want or not display a simple GUI (Swing) of the current place";
			}
		}
		else if(nameFile.equals("hermesfilelogger.properties")){
			
			if(property.equals("HERMESFILELOGGER.FILENAME")){
				feedback="The name of the file log";
			}
			else if(property.equals("HERMESFILELOGGER.LOG_DIRECTORY")){
				feedback="Where the logs has to be saved. You could use the [HERMES.HOME] to refer to the hermes platform home directory";
			}
			else if(property.equals("HERMESFILELOGGER.APPEND")){
				feedback="Append property true if the logger has to append new messages to the log file, false otherwise";
			}
			if(property.equals("HERMESFILELOGGER.COUNT")){
				feedback="File count property the number of files to use must be >0";
			}
			else if(property.equals("HERMESFILELOGGER.LIMIT")){
				feedback="File size property the maximum number of bytes to write to any one file must be >=0";
			}
			else if(property.equals("HERMESFILELOGGER.FORMAT")){
				feedback="File format property must be \"simple\" or \"xml\" ";
			}
		}
		else if(nameFile.equals("hermesnet.properties")){
			
			if(property.equals("HERMESNET.AUTOLOADIP")){
				feedback="Try to get the local ip automatically (true or false)";
			}
			else if(property.equals("HERMESNET.IP")){
				feedback="IP Address of the machine where run the place (if AUTOLOAD is false)";
			}
			else if(property.equals("HERMESNET.PORT")){
				feedback="IP Port of the place";
			}
			else if(property.equals("HERMESNET.PHONENUMBER")){
				feedback="Phone number of the mobile phone";
			}
			if(property.equals("HERMESNET.TIMEOUT")){
				feedback="TIME OUT of the connections (milliseconds, 0 for unlimited timeout)";
			}
			else if(property.equals("HERMESNET.PLACENAME")){
				feedback="Place name, free ascii text";
			}
			else if(property.equals("HERMESNET.PLACEDESC")){
				feedback="Place description, free ascii text";
			}
		}
		else if(nameFile.equals("hubServiceAgent.properties")){

			if(property.equals("HERMESV2HUB.CELLNUMB")){
				feedback="phone-numbers of well known peers";
			}

			if(property.equals("HERMESV2HUB.IP")){
				feedback="host names list of well known peers";
			}

			if(property.equals("HERMESV2HUB.PORT")){
				feedback="ports list of well known peers";
			}
		}

		return feedback;

	}

}
